import 'package:flutter/material.dart';
import 'package:test_module/KeepAliveWrapper.dart';

import 'SettingPage.dart';

class BusinessPage extends StatelessWidget {
  const BusinessPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    print("BusinessPage build ");

    var children = <Widget>[];
    // 生成 6 个 Tab 页
    for (int i = 0; i < 6; ++i) {
      children.add( KeepAliveWrapper(child: SettingPage( text: '$i')));
    }

    return Scaffold(
      body: Center(
        child: PageView(
          scrollDirection: Axis.vertical, // 滑动方向为垂直方向
          children: children,
        ),
      ),
    );
  }
}
